/*
 * XML Type:  XDatetimeFrame
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XDatetimeFrame
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XDatetimeFrame(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XDatetimeFrameImpl extends com.seedwill.xul.widget.impl.XInputImpl implements com.seedwill.xul.widget.XDatetimeFrame
{
    private static final long serialVersionUID = 1L;
    
    public XDatetimeFrameImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DATETIMEELEMENT$0 = 
        new javax.xml.namespace.QName("", "dateTimeElement");
    private static final javax.xml.namespace.QName MAX$2 = 
        new javax.xml.namespace.QName("", "max");
    private static final javax.xml.namespace.QName MIN$4 = 
        new javax.xml.namespace.QName("", "min");
    private static final javax.xml.namespace.QName STEP$6 = 
        new javax.xml.namespace.QName("", "step");
    private static final javax.xml.namespace.QName STEPUNIT$8 = 
        new javax.xml.namespace.QName("", "stepUnit");
    
    
    /**
     * Gets array of all "dateTimeElement" elements
     */
    public com.seedwill.xul.widget.XDateTimePicker[] getDateTimeElementArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(DATETIMEELEMENT$0, targetList);
            com.seedwill.xul.widget.XDateTimePicker[] result = new com.seedwill.xul.widget.XDateTimePicker[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "dateTimeElement" element
     */
    public com.seedwill.xul.widget.XDateTimePicker getDateTimeElementArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDateTimePicker target = null;
            target = (com.seedwill.xul.widget.XDateTimePicker)get_store().find_element_user(DATETIMEELEMENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "dateTimeElement" element
     */
    public int sizeOfDateTimeElementArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DATETIMEELEMENT$0);
        }
    }
    
    /**
     * Sets array of all "dateTimeElement" element
     */
    public void setDateTimeElementArray(com.seedwill.xul.widget.XDateTimePicker[] dateTimeElementArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(dateTimeElementArray, DATETIMEELEMENT$0);
        }
    }
    
    /**
     * Sets ith "dateTimeElement" element
     */
    public void setDateTimeElementArray(int i, com.seedwill.xul.widget.XDateTimePicker dateTimeElement)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDateTimePicker target = null;
            target = (com.seedwill.xul.widget.XDateTimePicker)get_store().find_element_user(DATETIMEELEMENT$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(dateTimeElement);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "dateTimeElement" element
     */
    public com.seedwill.xul.widget.XDateTimePicker insertNewDateTimeElement(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDateTimePicker target = null;
            target = (com.seedwill.xul.widget.XDateTimePicker)get_store().insert_element_user(DATETIMEELEMENT$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "dateTimeElement" element
     */
    public com.seedwill.xul.widget.XDateTimePicker addNewDateTimeElement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDateTimePicker target = null;
            target = (com.seedwill.xul.widget.XDateTimePicker)get_store().add_element_user(DATETIMEELEMENT$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "dateTimeElement" element
     */
    public void removeDateTimeElement(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DATETIMEELEMENT$0, i);
        }
    }
    
    /**
     * Gets the "max" element
     */
    public java.math.BigDecimal getMax()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAX$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getBigDecimalValue();
        }
    }
    
    /**
     * Gets (as xml) the "max" element
     */
    public org.apache.xmlbeans.XmlDecimal xgetMax()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(MAX$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "max" element
     */
    public boolean isSetMax()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MAX$2) != 0;
        }
    }
    
    /**
     * Sets the "max" element
     */
    public void setMax(java.math.BigDecimal max)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAX$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAX$2);
            }
            target.setBigDecimalValue(max);
        }
    }
    
    /**
     * Sets (as xml) the "max" element
     */
    public void xsetMax(org.apache.xmlbeans.XmlDecimal max)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(MAX$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDecimal)get_store().add_element_user(MAX$2);
            }
            target.set(max);
        }
    }
    
    /**
     * Unsets the "max" element
     */
    public void unsetMax()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MAX$2, 0);
        }
    }
    
    /**
     * Gets the "min" element
     */
    public java.math.BigDecimal getMin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MIN$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getBigDecimalValue();
        }
    }
    
    /**
     * Gets (as xml) the "min" element
     */
    public org.apache.xmlbeans.XmlDecimal xgetMin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(MIN$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "min" element
     */
    public boolean isSetMin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MIN$4) != 0;
        }
    }
    
    /**
     * Sets the "min" element
     */
    public void setMin(java.math.BigDecimal min)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MIN$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MIN$4);
            }
            target.setBigDecimalValue(min);
        }
    }
    
    /**
     * Sets (as xml) the "min" element
     */
    public void xsetMin(org.apache.xmlbeans.XmlDecimal min)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(MIN$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDecimal)get_store().add_element_user(MIN$4);
            }
            target.set(min);
        }
    }
    
    /**
     * Unsets the "min" element
     */
    public void unsetMin()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MIN$4, 0);
        }
    }
    
    /**
     * Gets the "step" element
     */
    public java.math.BigDecimal getStep()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STEP$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getBigDecimalValue();
        }
    }
    
    /**
     * Gets (as xml) the "step" element
     */
    public org.apache.xmlbeans.XmlDecimal xgetStep()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(STEP$6, 0);
            return target;
        }
    }
    
    /**
     * True if has "step" element
     */
    public boolean isSetStep()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STEP$6) != 0;
        }
    }
    
    /**
     * Sets the "step" element
     */
    public void setStep(java.math.BigDecimal step)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STEP$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STEP$6);
            }
            target.setBigDecimalValue(step);
        }
    }
    
    /**
     * Sets (as xml) the "step" element
     */
    public void xsetStep(org.apache.xmlbeans.XmlDecimal step)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(STEP$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDecimal)get_store().add_element_user(STEP$6);
            }
            target.set(step);
        }
    }
    
    /**
     * Unsets the "step" element
     */
    public void unsetStep()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STEP$6, 0);
        }
    }
    
    /**
     * Gets the "stepUnit" element
     */
    public com.seedwill.xul.widget.XDatetimeFrame.StepUnit.Enum getStepUnit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STEPUNIT$8, 0);
            if (target == null)
            {
                return null;
            }
            return (com.seedwill.xul.widget.XDatetimeFrame.StepUnit.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "stepUnit" element
     */
    public com.seedwill.xul.widget.XDatetimeFrame.StepUnit xgetStepUnit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDatetimeFrame.StepUnit target = null;
            target = (com.seedwill.xul.widget.XDatetimeFrame.StepUnit)get_store().find_element_user(STEPUNIT$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "stepUnit" element
     */
    public boolean isSetStepUnit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STEPUNIT$8) != 0;
        }
    }
    
    /**
     * Sets the "stepUnit" element
     */
    public void setStepUnit(com.seedwill.xul.widget.XDatetimeFrame.StepUnit.Enum stepUnit)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STEPUNIT$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STEPUNIT$8);
            }
            target.setEnumValue(stepUnit);
        }
    }
    
    /**
     * Sets (as xml) the "stepUnit" element
     */
    public void xsetStepUnit(com.seedwill.xul.widget.XDatetimeFrame.StepUnit stepUnit)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XDatetimeFrame.StepUnit target = null;
            target = (com.seedwill.xul.widget.XDatetimeFrame.StepUnit)get_store().find_element_user(STEPUNIT$8, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.widget.XDatetimeFrame.StepUnit)get_store().add_element_user(STEPUNIT$8);
            }
            target.set(stepUnit);
        }
    }
    
    /**
     * Unsets the "stepUnit" element
     */
    public void unsetStepUnit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STEPUNIT$8, 0);
        }
    }
    /**
     * An XML stepUnit(@).
     *
     * This is an atomic type that is a restriction of com.seedwill.xul.widget.XDatetimeFrame$StepUnit.
     */
    public static class StepUnitImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements com.seedwill.xul.widget.XDatetimeFrame.StepUnit
    {
        private static final long serialVersionUID = 1L;
        
        public StepUnitImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected StepUnitImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
